<template>
  <a-descriptions
    :column="setting.column"
    :size="setting.size"
    :layout="setting.layout"
    :align="setting.align"
    :bordered="setting.bordered"
  >
    <!------------------ item --------------------->
    <a-descriptions-item
      v-for="item in data"
      :label="item.label"
      :key="item.index"
    >
      <a v-if="setting.withImg">查看图片</a>
      <div style="color:#FFFFFF">
        {{ item.data }}
      </div>
    </a-descriptions-item>
  </a-descriptions>
</template>
<script>
export default {
  props: {
    setting: {
      type: Object,
      default: function() {
        return {
          column: 3,
          layout: "horizontal", //horizontal,vertical
          size: "small",
          align: "left",
          class: "con-descriptions",
          bordered: true,
          withImg: true,
        };
      },
    },
    data: {
      type: Array,
      default: function() {
        return [
          {
            label: "站点名称",
            data: "桐乡市广播电视发射塔",
            index: 1,
            color: "#FFFFFF",
          },
          {
            label: "铁塔高度",
            data: "165m",
            index: 2,
            color: "#FFFFFF",
          },
          {
            label: "结构类型",
            data: "多边形钢管组合",
            index: 3,
            color: "#FFFFFF",
          },
          {
            label: "经纬度",
            data: "120.542367,30.673453",
            index: 4,
            color: "#FFFFFF",
          },
          {
            label: "地址",
            data: "桐乡市二环北路钟大混凝土公司北100米",
            index: 5,
            color: "#FFFFFF",
          },
          {
            label: "图纸名称",
            data: "桐乡市广播电视发射塔迁建工程图纸",
            index: 6,
            color: "#FFFFFF",
          },
          {
            label: "设计单位",
            data: "中广电广播电影电视设计研究院",
            index: 7,
            color: "#FFFFFF",
          },
        ];
      },
    },
  },
  data() {
    return {};
  },
};
</script>
